home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sph_dos.lha / dos / sphsrc.v08 / sph_error.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-11-26  |  2.6 KB  |  74 lines

  1. #include "HEADERS.h"
  2. #include "sphigslocal.h"
  3. #include <stdio.h>
  4.  
  5.  
  6. #ifndef THINK_C
  7. static
  8. char *(sphigs_errmsgs[]) =
  9.   {
  10.    "UNUSED",
  11.    "SPHIGS is not enabled yet!  Have you heard about SPH_begin()?\n",
  12.    "You sent a bad rectangle (either your l>r, or your b>t).\n",
  13.    "A structure is already open.  You attempted to open another one.\n",
  14.    "No structure is currently open.  You can't do editing operations.\n",
  15.    "You sent a bad structure-id.\n",
  16.    "You sent a bad name.\n", 
  17.    "You sent a bad view index.\n",
  18.    "You attempted to change the window or viewport for view #0.\n",
  19.    "You tried to move the element ptr outside the bounds of the structure.\n",
  20.    "You referred to a label not found during a forward scan.\n",
  21.    "You tried to delete an element where none exists.\n",
  22.    "You tried to unpost a structure that is not known to be posted there.\n",
  23.    "SPHIGS is already enabled!  You tried to enable it yet again.\n",
  24.    "You sent a bad 'update-method' (second parameter).\n",
  25.    "You sent a bad vertex count.\n",
  26.    "You sent a bad edge count.\n",
  27.    "You referred to a device other than KEYBOARD.\n",
  28.    "Pick corr. is illegal when the display is out-of-synch with the CSS!\n",
  29.    "Pick correlation is illegal for a viewport using wireframe-raw mode.\n", 
  30.    "You tried to add one edge/vertex too many!\n", 
  31.    "The vertex-index for the first vertex in this edge is illegal!\n",
  32.    "The vertex-index for the second vertex in this edge is illegal!\n",
  33.    "You're closing the polyhedron before specifying all the vertices!\n",
  34.    "You're closing the polyhedron before specifying all the edges!\n",
  35.    "Viewing parameter error: %s\n",
  36.    "You sent an element-index-range where the first index was not <= the second one!\n",
  37.    "The MAT3 matrix package encountered an error.  See SRGPlogfile.\n",
  38.    "UNUSED",
  39.    "Sorry!  I ran out of dynamic memory!\n",
  40.    "You sent a color index that is beyond the available range.\n",
  41.    "You can't set entries 0, 1, or any out-of-range entry of the color table.\n",
  42.    
  43.    "UNUSED"
  44. };
  45. #endif
  46.  
  47.  
  48. extern char *srgp__identifierOfPackage;
  49.  
  50. #ifdef THINK_C
  51. extern int   srgp__identifierOfMessages;
  52. #else
  53. extern char **srgp__identifierOfMessages;
  54. #endif
  55.  
  56. #ifdef THINK_C
  57. /* We hide this from gnu's compiler, which doesn't understand it. */
  58. void SRGP__error (int errtype, ...);
  59. #endif
  60.  
  61.  
  62. void
  63. SPH__error (errtype, arg1, arg2, arg3, arg4, arg5)
  64. int errtype, arg1, arg2, arg3, arg4, arg5;
  65. {
  66.    srgp__identifierOfPackage = "SPHIGS";
  67. #ifdef THINK_C
  68.    srgp__identifierOfMessages = 129;
  69. #else
  70.    srgp__identifierOfMessages = sphigs_errmsgs;
  71. #endif
  72.    SRGP__error (errtype, arg1, arg2, arg3, arg4, arg5);
  73. }
  74.